<script setup lang="ts">
  import { reactive } from 'vue';
  const user = reactive({"ydsc":0,"ydbs":0,"ydjl":0})
  function undateUser(){
    user.ydsc=111;
    user.ydbs=11110000;
    user.ydjl=100000;
    console.log(user)
  }
</script>
<template>
  <h1>运动数据</h1>
  <h3>运动时长:{{user.ydsc}}分钟</h3>
  <h3>运动步数:{{user.ydbs}}步</h3>
  <h3>运动距离:{{user.ydjl}}公里</h3>
  
  <input type="button" value="更新" @click="undateUser"></input>
</template>
<style scoped>
/* 样式表代码 */ </style>